﻿using UnityEngine;
using System.Collections;

public class Pipe_ang1 : MonoBehaviour {

	float speed = 100.0f;
	
	
	
	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		if ((Kamera.turn == false && gameObject.name == "Axis1") || (Kamera.turn == true && gameObject.name == "Axis2")) {
				
			if (Input.GetKey ("up"))
					transform.Rotate (0.0f, 0.0f, -speed * Time.deltaTime);
					
			if (Input.GetKey ("down"))
					transform.Rotate (0.0f, 0.0f, speed * Time.deltaTime);
		
				}		
	}
		
	}
